/** layuiAdmin.std-v1.1.0 LPPL License By http://www.layui.com/admin/ */
;
layui.define(function(e) {
    var i = (layui.$, layui.layer, layui.laytpl, layui.setter, layui.view, layui.admin);
    var $ = layui.$;
    i.events.logout = function() {
        i.req({
            url: layui.setter.base + "json/user/logout.js",
            type: "get",
            data: {},
            done: function(e) {
                i.exit(function() {
                    location.href = "user/login.html"
                })
            }
        })
    },
        e("common", {})

    $.prototype.serializeObject = function () {
        var obj = new Object();
        $.each(this.serializeArray(), function (index, param) {
            if (!(param.name in obj)) {
                obj[param.name] = param.value;
            }
        });
        return clearEmptyAttr(obj);
    };
    function clearEmptyAttr(obj){
        var json = {};
        $.each(obj, function(key,value){
            if(value != ''){
                json[key] = value;
            }
        });
        return json;
    };
});